//
//  ZJloadView.m
//  ZiJinLian
//
//  Created by lzy on 2017/3/17.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ZJloadView.h"
#define LOGIN_LOADING_VIEW_TAG   999
#define LOGIN_LOADING_VIEW_WIDTH 160
#define LOGIN_LOADING_VIEW_HEIGHT 50

#define REQUEST_LOADING_VIEW_TAG   888
#define REQUEST_LOADING_VIEW_WIDTH 50
#define REQUEST_LOADING_VIEW_HEIGHT 50

#define LOADING_VIEW_TAG    666
#define LOADING_VIEW_WIDTH  80
#define LOADING_VIEW_HEIGHT 90

#define NORESULT_VIEW_TAG   777
#define NONET_VIEW_TAG      888

@implementation ZJloadView

+(void)showNoResultView:(UIView *)tgView withimageName:(NSString *)imageName withNoResult:(NSString *)NoResultmsg

{
    UIView *ftView = tgView;
    
    //为空的图
    UIView *plaView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, MainW, tgView.frame.size.height)];
    plaView.tag = NORESULT_VIEW_TAG;
    plaView.backgroundColor = [UIColor whiteColor];
    
    UIImageView *cirImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 120, 150)];
    cirImg.image = [UIImage imageNamed:imageName];
    cirImg.center = CGPointMake(MainW/2, tgView.frame.size.height/2-150);
    //cirImg.layer.masksToBounds=YES;
    cirImg.contentMode = UIViewContentModeScaleAspectFit;
    [plaView addSubview:cirImg];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, MainW, 30)];
    label.font = [UIFont boldSystemFontOfSize:16.0f];
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor=TextColor3;
    label.text = NoResultmsg;
    label.font=FontAndStyle14;
    label.center = CGPointMake(cirImg.center.x, cirImg.frame.origin.y+150+20);
    [plaView addSubview:label];
    [ftView addSubview:plaView];
}
+(void)hideNoResultView:(UIView *)tagCtl
{
    UIView *fatherView = (UIView *)tagCtl;
    UIView *tgView = (UIView *)[fatherView viewWithTag:NORESULT_VIEW_TAG];
    if (tgView) {
        [tgView removeFromSuperview];
        tgView = nil;
    }
}
+(instancetype)createLoadingView{

    return nil;
}

-(void)startLoading{


}

-(void)stopLoading{

}

@end
